<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//求斐波那契数列
			function fib(){
				if(n===1||n===2){
					return 1;
				}
				
				return fib(n-1)+fib(n-2);
				
			}
			
			console.log(fib(5));
		</script>
	</body>
</html>
